package com.test.demo.controller;

import com.test.demo.pojo.Test;
import com.test.demo.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@EnableConfigurationProperties({User.class,Test.class})
public class UserController {

    @Autowired
    private User user;

    @Autowired
    private Test test;

    @RequestMapping("/user")
    public String userTest(){
        return user.getName()+">>>"+user.getAge()+">>>"+user.getUuid()+">>>"+user.getValue()+">>>"+user.getMax()+">>>"+user.getNumber()+">>>"+user.getGetting();
    }

    @RequestMapping("/test")
    public String test(){
        return test.getName()+":"+test.getAge();
    }

}
